<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app">
    // 3.使用组件
    <my-cpn></my-cpn>
    <my-cpn></my-cpn>
    <my-component></my-component>
</div>


<script src="../../js/vue.js"></script>
<script src="组件.js"></script>

<script>
    /*组件化使用步骤*/
    // 1.创建组件构造器对象
    const cpnConstructor = Vue.extend({
        template: `<div>
                        <h2>标题=============标题</h2>
                        <p>内容=============内容</p>
                        <p>内容=============内容</p>
                    </div>`
    });
    
    // 2.注册组件
    Vue.component("my-cpn",cpnConstructor);
    
    const vue = new Vue({
        el: "#app",
        data: {
            message: "Hello vue,你好！"
        },
        methods: {
            
        }
    });
</script>
</body>
</html>